package com.imti.mall.sale.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.imti.mall.model.sms.pojo.SmsFlashPromotion;
import com.imti.mall.sale.mapper.SmsFlashPromotionDynaSqlProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;

import java.util.List;

/**
 * ClassName: SmsFlashPromotionDao
 * Description:
 * date: 2022/9/19 23:14
 *
 * @author: youhun
 * @version:
 * @since JDK 1.8
 */
@Mapper
public interface SmsFlashPromotionDao extends BaseMapper<SmsFlashPromotion> {
    /**
     * 查询限时购表
     * @param smsFlashPromotion
     * @return
     */
    @SelectProvider(type = SmsFlashPromotionDynaSqlProvider.class, method = "findSmsFlashPromotion")
    public List<SmsFlashPromotion> findSmsFlashPromotion(SmsFlashPromotion smsFlashPromotion);
    /**
     * 查询限时购表总条数
     * @param smsFlashPromotion
     * @return
     */
    @SelectProvider(type = SmsFlashPromotionDynaSqlProvider.class, method = "countSmsFlashPromotion")
    public Integer countSmsFlashPromotion(SmsFlashPromotion smsFlashPromotion);

    /**
     * 根据id修改限时购
     * @param smsFlashPromotion
     * @return
     */
    @UpdateProvider(type = SmsFlashPromotionDynaSqlProvider.class, method = "updateSmsFlashPromotion")
    public Integer updateSmsFlashPromotion(SmsFlashPromotion smsFlashPromotion);


}
